/**
  ETFRoot project, Anyang Normal University && IMP-CAS

  \class ETFAmplitudeChannel
  \brief general class to hold a channel of amplitude, e.g. qdc, adc, tac
  \author SUN Yazhou, asia.rabbit@163.com
  \since 2021-09-27
  \date 2021-09-27 last modified
  \attention
  changelog
  <table>
  <tr>  <th>Date        <th>Author      <th>Description                    </tr>
  <tr>  <td>2021-09-27   <td>Asia Sun    <td>file created                  </tr>
  </table>

  \copyright Copyright (c) 2021 Anyang Normal U. && IMP-CAS with LGPLv3 LICENSE
*/

#ifndef ETFAmplitudeChannel_h
#define ETFAmplitudeChannel_h

#include <vector>
#include "ETFRawChannel.h"

using std::vector;

class ETFAmplitudeChannel : public ETFRawChannel{
public:
  ETFAmplitudeChannel();
  ETFAmplitudeChannel(const ETFAmplitudeChannel &ach);
  virtual ~ETFAmplitudeChannel();

  double GetAmplitude(int i = 0){ return fAmplitudes[i]; }
  const vector<double> &GetAmplitudeVec() const{ return fAmplitudes; }
  virtual void SetAmplitude(int amp, int i = 0); // assign i-th value in channel number
  virtual void AddAmplitude(int amp); // add a amplitude in channel number
  virtual void Reset();
  virtual void Initialize(){ Reset(); }
  virtual void Print() const;

  ClassDef(ETFAmplitudeChannel, 1); // general class to hold a channel of amplitude

protected:
  vector<double> fAmplitudes;
};

#endif
